from xml.dom import minidom

class readXml():

    def read_xml(self,filename,onenode,twonode):
        root = minidom.parse(filename)
        firstnode = root.getElementsByTagName(onenode)[0]
        secondnode = firstnode.getElementsByTagName(twonode)[0].firstChild.data

        return secondnode

# r = readXml()
# print(r.read_xml("../DataXml/data.xml","sum","num1"))
# print(r.read_xml("../DataXml/data.xml","sum","num2"))